import { Api } from './api.entity'
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'

@Entity()
export class ApiParam {
  @PrimaryGeneratedColumn()
  id: number

  @Column()
  name: string

  @Column()
  type: string

  @Column()
  require: boolean

  @Column()
  default: string

  @Column()
  description: string

  @ManyToOne(type => Api, api => api.params)
  api: Api
}
